package com.youlu.campus.entity;

import com.youlu.campus.base.base.EntityBase;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;


/**
 * 订单发货订阅通知
 */
@Getter
@Setter
@Document(collection = "delivery_order_sub_msg")
@CompoundIndexes({
        @CompoundIndex(name = "sub_order_comIdx",def = "{'userId':1,'orderNo':1,'subTemplateId':1}",unique = true)
})
public class DeliveryOrderSubMsg extends EntityBase {

    /**
     * 订阅订单号
     */
    @Indexed
    private String orderNo;

    private String activityId;

    private String activityName;
    @Indexed
    private String userId;

    private String appId;

    private String openId;

    private Long subCount =0L;

    private String subTemplateId;


}
